package com.service.impl;

import com.bean.Goods;
import com.bean.Orders;
import com.bean.Seckill;
import com.dao.OrderGoodsMapper;
import com.dao.SeckillGoodsMapper;
import com.service.OrderGoodsService;
import com.service.SeckillGoodsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author FatterShadystart
 * @create 2023-02-01 11:05
 */
@Service
public class SeckillGoodsServiceImpl implements SeckillGoodsService {

    @Resource
    private SeckillGoodsMapper seckillGoodsMapper;

    @Override
    public Long selectBySeckillIdAndGoodsId(Seckill seckill, Goods goods) {
        return seckillGoodsMapper.selectBySeckillIdAndGoodsId(seckill,goods);
    }

    @Override
    public Integer insert(Long seckillId, Long goodsId) {
        return seckillGoodsMapper.insert(seckillId,goodsId);
    }

    @Override
    public Integer deleteBatch(List<Long> seckillGoodsIdList) {
        return seckillGoodsMapper.deleteBatch(seckillGoodsIdList);
    }
}
